package common.util;


import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

/**
 * Created by Administrator on 2017/7/14.
 */
public class BeanCopyUtils {

    /**
     * bean对象属性转换
     * @param source
     * @param target
     */
    public static void copyProperties(Object source, Object target) {
        try {
            BeanUtils.copyProperties(source,target);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }
    }
}
